package com.ruoyi.system.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

import javax.validation.constraints.*;

/**
 * 学校对象 p_school
 * 
 * @author ruoyi
 * @date 2024-01-28
 */
public class PSchool extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** 学校id */
    private Long id;

    /** 学校名称 */
    @Excel(name = "学校名称")
    @NotNull
    private String schoolName;

    /** 学校地址 */
    @Excel(name = "学校地址")
    @NotNull
    private String addressName;

    /** 显示顺序 */
    @Excel(name = "显示顺序")
    @NotNull
    private Integer orderNum;

    /** 负责人 */
    @Excel(name = "负责人")
    @NotNull
    private String leader;

    /** 联系电话 */
    @Excel(name = "联系电话")
    @NotNull
    @Pattern(regexp = "^((13\\d{9}$)|(15[0,1,2,3,5,6,7,8,9]\\d{8}$)|(18[0,2,5,6,7,8,9]\\d{8}$)|(147\\d{8})$)",message = "请输入一个正确的手机号码！")
    private String phone;

    /** 学校类型 自定义 */
    @Excel(name = "学校类型 自定义")
    @NotNull
    private String schoolType;

    /** 学校人数 */
    @Excel(name = "学校人数")
    @NotNull
    private String schoolNum;

    /** 邮箱 */
    @Excel(name = "邮箱")
    @Email
    private String email;

    /** 省份 */
    @Excel(name = "省份")
    @NotNull
    private String province;

    /** 市 */
    @Excel(name = "市")
    @NotNull
    private String city;

    /** 区 */
    @Excel(name = "区")
    private String district;

    /** 经度 */
    @Excel(name = "经度")
    @NotNull
    @DecimalMin(value = "0",message = "输入一个正确的经度")
    private String longitude;

    /** 纬度 */
    @Excel(name = "纬度")
    @NotNull
    @DecimalMin(value = "0",message = "输入一个正确的纬度")
    private String latitude;

    /** 包含区域（教学区，生活区，图书馆，办公区，户外活动区） */
    @Excel(name = "包含区域", readConverterExp = "教=学区，生活区，图书馆，办公区，户外活动区")
    @NotNull
    private String region;

    /** 状态（0正常 1停用） */
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setSchoolName(String schoolName) 
    {
        this.schoolName = schoolName;
    }

    public String getSchoolName() 
    {
        return schoolName;
    }
    public void setOrderNum(Integer orderNum) 
    {
        this.orderNum = orderNum;
    }

    public Integer getOrderNum() 
    {
        return orderNum;
    }
    public void setLeader(String leader) 
    {
        this.leader = leader;
    }

    public String getLeader() 
    {
        return leader;
    }
    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }
    public void setSchoolType(String schoolType) 
    {
        this.schoolType = schoolType;
    }

    public String getSchoolType() 
    {
        return schoolType;
    }
    public void setSchoolNum(String schoolNum) 
    {
        this.schoolNum = schoolNum;
    }

    public String getSchoolNum() 
    {
        return schoolNum;
    }
    public void setEmail(String email) 
    {
        this.email = email;
    }

    public String getEmail() 
    {
        return email;
    }
    public void setProvince(String province) 
    {
        this.province = province;
    }

    public String getProvince() 
    {
        return province;
    }
    public void setCity(String city) 
    {
        this.city = city;
    }

    public String getCity() 
    {
        return city;
    }
    public void setDistrict(String district) 
    {
        this.district = district;
    }

    public String getDistrict() 
    {
        return district;
    }
    public void setLongitude(String longitude) 
    {
        this.longitude = longitude;
    }

    public String getLongitude() 
    {
        return longitude;
    }
    public void setLatitude(String latitude) 
    {
        this.latitude = latitude;
    }

    public String getLatitude() 
    {
        return latitude;
    }
    public void setRegion(String region) 
    {
        this.region = region;
    }

    public String getRegion() 
    {
        return region;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public String getAddressName() {
        return addressName;
    }

    public void setAddressName(String addressName) {
        this.addressName = addressName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("schoolName", getSchoolName())
            .append("addressName",getAddressName())
            .append("orderNum", getOrderNum())
            .append("leader", getLeader())
            .append("phone", getPhone())
            .append("schoolType", getSchoolType())
            .append("schoolNum", getSchoolNum())
            .append("email", getEmail())
            .append("province", getProvince())
            .append("city", getCity())
            .append("district", getDistrict())
            .append("longitude", getLongitude())
            .append("latitude", getLatitude())
            .append("region", getRegion())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
